Name: 'NMWirelessDialog',
Extends: ModalDialog.ModalDialog,
- _init: function(client, device) {
+ _init: function(client, device, settings) {
this.parent({ styleClass: 'nm-dialog' });
this._client = client;
this._networks = [];
this._buildLayout();
- this._connections = device.get_available_connections();
+ let connections = settings.list_connections();
+ this._connections = connections.filter(Lang.bind(this, function(connection) {
+ return device.connection_valid(connection);
+ }));
this._apAddedId = device.connect('access-point-added', Lang.bind(this, this._accessPointAdded));
this._apRemovedId = device.connect('access-point-removed', Lang.bind(this, this._accessPointRemoved));
Name: 'NMDeviceWireless',
category: NMConnectionCategory.WIRELESS,
- _init: function(client, device) {
+ _init: function(client, device, settings) {
this._client = client;
this._device = device;
+ this._settings = settings;
this._description = '';
},
_showDialog: function() {
- this._dialog = new NMWirelessDialog(this._client, this._device);
+ this._dialog = new NMWirelessDialog(this._client, this._device, this._settings);
this._dialog.connect('closed', Lang.bind(this, this._dialogClosed));
this._dialog.open();
},